<template>
  <div class="header">
    <div class="header-left"><span class="iconfont">&#xe622;</span></div>
    <div class="header-input"><span class="iconfont header-input-span">&#xe63d;</span>输入城市/景点/游玩主题</div>
    <router-link to="/city">
      <div class="header-right">
        {{this.city}}
        <span class="iconfont">&#xe629;</span></div>
    </router-link>
  </div>
</template>
<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="stylus" scoped>
  @import "~styles/varibles.styl"
  .header
    display: flex
    height: .86rem
    background-color: $bgColor
    text-align: center
    color #ffffff
    line-height: .86rem
    .header-left
      width: .64rem
      float: left
      span
        display block
    .header-input
      flex: 1
      height: .64rem
      margin-top .12rem
      margin-bottom .12rem
      background: #ffffff
      border-radius: .1rem
      color: #cccccc
      line-height: .64rem
      padding-left 8px
      text-align left
      .header-input-span
        margin-right 4px
    .header-right
      min-width: 1.04rem
      padding 0 .04rem
      float: right
      color: #ffffff

</style>
